//
//  JKThemeEditorsCell.swift
//  ZhiHuDaily-Swift
//
//  Created by albert on 2018/3/21.
//  Copyright © 2018年 安永博. All rights reserved.
//

import UIKit

class JKThemeEditorsCell: JKBaseTableViewCell {

    @IBOutlet weak var iconImageView: UIImageView!
    @IBOutlet weak var nameLabel: UILabel!
    @IBOutlet weak var desLabel: UILabel!
    
    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
    }
    
    public var editorModel: JKThemeEditorModel? {
        
        didSet{
            
            iconImageView.jk_setCircleIcon(withUrlStr: editorModel?.avatar)
            nameLabel.text = editorModel?.name
            desLabel.text = editorModel?.bio
        }
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }

}

extension JKThemeEditorsCell {
    
    override func updateSkin() {
        super.updateSkin()
        
        nameLabel.textColor = (skinModel == JKNightSkinModelValue) ? JKColor(128, 128, 128) : JKSameRGBColor(53)
        
        desLabel.textColor = (skinModel == JKNightSkinModelValue) ? JKColor(108, 108, 108) : JKSameRGBColor(118)
    }
}
